#ifndef _STREAM_H_
#define _STREAM_H_


/*
	class : Stream
	desc : This class came from the need to separate and
		break apart more of the protocol class from the actual
		interface to it. Realistically this should be as easy to
		use as possible and separate protocol into an interface (Stream),
		the middle layer (Protocol), and the lower layer the
		implementation of the protocol which can be a software 
		implementation or a hardware implementation. This isn't
		quite fully implemented yet.
*/
template<typename ProtocolImplementation>
class Stream
{
	private:
	//protocol used to get data from the protocol.
	Protocol<ProtocolImplementation>* protocol;
	public :
	Stream(Protocol* p){protocol = p;}
	
	Stream& operator>>(bool& val);
	Stream& operator>>(short& val);
	Stream& operator>>(unsigned short& val);
	Stream& operator>>(int& val);
	Stream& operator>>(unsigned int& val);
	Stream& operator>>(long& val);
	Stream& operator>>(unsigned long& val);
	Stream& operator>>(float& val);
	Stream& operator>>(double& val);
	Stream& operator>>(long double& val);
	Stream& operator>>(void*& val);
	
	//output....
	Stream& operator<<(bool val);
	Stream& operator<<(short val);
	Stream& operator<<(unsigned short val);
	Stream& operator<<(int val);
	Stream& operator<<(unsigned int val);
	Stream& operator<<(long val);
	Stream& operator<<(unsigned long val);
	Stream& operator<<(float val);
	Stream& operator<<(double val);
	Stream& operator<<(long double val);
	Stream& operator<<(void* val);	


};


#endif
